{{set classifyArr = [null, '精华', '分享', '问答', '招聘'] }}
<ul class="list-group list-group-flush">
    <li class="list-group-item">
        <div class="card mb-3" style="max-width: 540px;">
            <div class="row no-gutters" id="userInfoContainer">
                <div class="col-md-4">
                    <img src="{{avatar?avatar:'/img/bg.jpg'}}" class="card-img" alt="...">
                    <input type="file" name="avatar" id="userPic">
                </div>
                <div class="col-md-8">
                    <div class="card-body">
                        <h5 class="card-title">{{nick_name}}</h5>
                        <p class="card-text">email: <span>{{email}}</span></p>
                        <p class="card-text">注册时间: <small>{{date}}</small></p>
                        <p class="card-text">用户级别: <small>{{identity==0?'管理员':'普通用户'}}</small></p>
                    </div>
                </div>
            </div>
        </div>

    </li>
    <li class="list-group-item active">用户发布过的文章</li>
    <ul class="list-group forum-list-wrapper">
        {{each publishArr}}
        <li class="list-group-item forum-list-item">
            <div class="item-desc">
                <img src="{{$value.userInfo.avatar?$value.userInfo.avatar:'/img/bg.jpg'}}" alt="">
                <div class="read-num-wrapper">
                    <span>{{$value.__v}}</span>
                    <span>/</span>
                    <span>{{$value.readyNum}}</span>
                </div>
                <div class="forum-share admin">
                    {{classifyArr[$value.classify]}}
                </div>
                <div class="forum-title">
                    <a href="/api/article/articleDetail/{{@ $value._id}}">
                                    {{$value.title}}
                            </a>
                </div>
            </div>
            <div class="item-time">
                {{if $value.ratings.length > 0}}
                <img class="last-forum-user" src="{{$value.ratings[0].avatar?$value.ratings[0].avatar:'/img/bg.jpg'}}" alt="">
                <span class="last-forum-time">{{distanceTime($value.ratings[0].date)}}</span> {{else}}
                <span class="last-forum-time">发布于： {{distanceTime($value.publishDate)}}</span> {{/if}}

            </div>
        </li>
        {{/each}}
    </ul>
    <li class="list-group-item active">用户回复过的文章</li>
    {{each ratingArr}}
    <li class="list-group-item forum-list-item">
        <div class="item-desc">
            <img src="{{$value.userInfo.avatar?$value.userInfo.avatar:'/img/bg.jpg'}}" alt="">
            <div class="read-num-wrapper">
                <span>{{$value.__v}}</span>
                <span>/</span>
                <span>{{$value.readyNum}}</span>
            </div>
            <div class="forum-share admin">
                {{classifyArr[$value.classify]}}
            </div>
            <div class="forum-title">
                <a href="/api/article/articleDetail/{{@ $value._id}}">
                                    {{$value.title}}
                            </a>
            </div>
        </div>
        <div class="item-time">
            {{if $value.ratings.length > 0}}
            <img class="last-forum-user" src="{{$value.ratings[0].avatar?$value.ratings[0].avatar:'/img/bg.jpg'}}" alt="">
            <span class="last-forum-time">{{distanceTime($value.ratings[0].date)}}</span> {{else}}
            <span class="last-forum-time">发布于： {{distanceTime($value.publishDate)}}</span> {{/if}}

        </div>
    </li>
    {{/each}}
</ul>